package com.xiashitech.agent.instrumentation.db.updateset.inst;

import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;

import java.util.Arrays;
import java.util.List;

import static java.util.Arrays.asList;

@AutoService(InstrumentationModule.class)
public class XSUpdateSetInstrumentationModule extends InstrumentationModule {
    public XSUpdateSetInstrumentationModule() {
        super("XSJdbcUpdateSet");
    }
    @Override
    public List<TypeInstrumentation> typeInstrumentations() {
        return asList(new XSUpdatePreparedStatementInstrumentation(),new XSUpdateStatementInstrumentation());
    }

    @Override
    public List<String> getAdditionalHelperClassNames() {
        return Arrays.asList("com.xiashitech.agent.instrumentation.db.updateset.XSUpdateSetAttributesExtractor",
                "com.xiashitech.agent.instrumentation.db.updateset.XSUpdateSetSingletons",
                "com.xiashitech.agent.utils.SessionUtil",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSUpdatePreparedStatementCallDepth",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSUpdateStatementCallDepth",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSUpdatePreparedStatementUpdateCountLastCallDepth",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSUpdateStatementUpdateCountCallDepth",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSUpdatePreparedStatementLastCallDepth");
    }
}
